package com.eshop.modules.activity.vo;

import com.eshop.modules.user.vo.UserQueryVo;
import java.io.Serializable;

public class BargainVo implements Serializable
{
    private StoreBargainQueryVo bargain;
    private UserQueryVo userInfo;
    private Integer bargainSumCount;
    
    BargainVo(final StoreBargainQueryVo bargain, final UserQueryVo userInfo, final Integer bargainSumCount) {
        this.bargain = bargain;
        this.userInfo = userInfo;
        this.bargainSumCount = bargainSumCount;
    }
    
    public static BargainVoBuilder builder() {
        return new BargainVoBuilder();
    }
    
    public StoreBargainQueryVo getBargain() {
        return this.bargain;
    }
    
    public UserQueryVo getUserInfo() {
        return this.userInfo;
    }
    
    public Integer getBargainSumCount() {
        return this.bargainSumCount;
    }
    
    public void setBargain(final StoreBargainQueryVo bargain) {
        this.bargain = bargain;
    }
    
    public void setUserInfo(final UserQueryVo userInfo) {
        this.userInfo = userInfo;
    }
    
    public void setBargainSumCount(final Integer bargainSumCount) {
        this.bargainSumCount = bargainSumCount;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof BargainVo)) {
            return false;
        }
        final BargainVo other = (BargainVo)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$bargainSumCount = this.getBargainSumCount();
        final Object other$bargainSumCount = other.getBargainSumCount();
        Label_0065: {
            if (this$bargainSumCount == null) {
                if (other$bargainSumCount == null) {
                    break Label_0065;
                }
            }
            else if (this$bargainSumCount.equals(other$bargainSumCount)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$bargain = this.getBargain();
        final Object other$bargain = other.getBargain();
        Label_0102: {
            if (this$bargain == null) {
                if (other$bargain == null) {
                    break Label_0102;
                }
            }
            else if (this$bargain.equals(other$bargain)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$userInfo = this.getUserInfo();
        final Object other$userInfo = other.getUserInfo();
        if (this$userInfo == null) {
            if (other$userInfo == null) {
                return true;
            }
        }
        else if (this$userInfo.equals(other$userInfo)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof BargainVo;
    }
    
    @Override
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $bargainSumCount = this.getBargainSumCount();
        result = result * 59 + (($bargainSumCount == null) ? 43 : $bargainSumCount.hashCode());
        final Object $bargain = this.getBargain();
        result = result * 59 + (($bargain == null) ? 43 : $bargain.hashCode());
        final Object $userInfo = this.getUserInfo();
        result = result * 59 + (($userInfo == null) ? 43 : $userInfo.hashCode());
        return result;
    }
    
    @Override
    public String toString() {
        return "BargainVo(bargain=" + this.getBargain() + ", userInfo=" + this.getUserInfo() + ", bargainSumCount=" + this.getBargainSumCount() + ")";
    }
    
    public static class BargainVoBuilder
    {
        private StoreBargainQueryVo bargain;
        private UserQueryVo userInfo;
        private Integer bargainSumCount;
        
        BargainVoBuilder() {
        }
        
        public BargainVoBuilder bargain(final StoreBargainQueryVo bargain) {
            this.bargain = bargain;
            return this;
        }
        
        public BargainVoBuilder userInfo(final UserQueryVo userInfo) {
            this.userInfo = userInfo;
            return this;
        }
        
        public BargainVoBuilder bargainSumCount(final Integer bargainSumCount) {
            this.bargainSumCount = bargainSumCount;
            return this;
        }
        
        public BargainVo build() {
            return new BargainVo(this.bargain, this.userInfo, this.bargainSumCount);
        }
        
        @Override
        public String toString() {
            return "BargainVo.BargainVoBuilder(bargain=" + this.bargain + ", userInfo=" + this.userInfo + ", bargainSumCount=" + this.bargainSumCount + ")";
        }
    }
}
